/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sirius.ms.sdk.model.ComputedSubtools;
import io.sirius.ms.sdk.model.DataQuality;
import io.sirius.ms.sdk.model.FeatureAnnotations;
import io.sirius.ms.sdk.model.MsData;
import io.sirius.ms.sdk.model.Tag;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * The AlignedFeature contains the ID of a feature (aligned over runs) together with some read-only information  that might be displayed in some summary view.
 */
@JsonPropertyOrder({
  AlignedFeature.JSON_PROPERTY_ALIGNED_FEATURE_ID,
  AlignedFeature.JSON_PROPERTY_COMPOUND_ID,
  AlignedFeature.JSON_PROPERTY_NAME,
  AlignedFeature.JSON_PROPERTY_EXTERNAL_FEATURE_ID,
  AlignedFeature.JSON_PROPERTY_ION_MASS,
  AlignedFeature.JSON_PROPERTY_CHARGE,
  AlignedFeature.JSON_PROPERTY_DETECTED_ADDUCTS,
  AlignedFeature.JSON_PROPERTY_RT_START_SECONDS,
  AlignedFeature.JSON_PROPERTY_RT_END_SECONDS,
  AlignedFeature.JSON_PROPERTY_RT_APEX_SECONDS,
  AlignedFeature.JSON_PROPERTY_QUALITY,
  AlignedFeature.JSON_PROPERTY_HAS_MS1,
  AlignedFeature.JSON_PROPERTY_HAS_MS_MS,
  AlignedFeature.JSON_PROPERTY_MS_DATA,
  AlignedFeature.JSON_PROPERTY_TOP_ANNOTATIONS,
  AlignedFeature.JSON_PROPERTY_TOP_ANNOTATIONS_DE_NOVO,
  AlignedFeature.JSON_PROPERTY_COMPUTING,
  AlignedFeature.JSON_PROPERTY_COMPUTED_TOOLS,
  AlignedFeature.JSON_PROPERTY_TAGS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class AlignedFeature {
  public static final String JSON_PROPERTY_ALIGNED_FEATURE_ID = "alignedFeatureId";
  @jakarta.annotation.Nullable
  private String alignedFeatureId;

  public static final String JSON_PROPERTY_COMPOUND_ID = "compoundId";
  @jakarta.annotation.Nullable
  private String compoundId;

  public static final String JSON_PROPERTY_NAME = "name";
  @jakarta.annotation.Nullable
  private String name;

  public static final String JSON_PROPERTY_EXTERNAL_FEATURE_ID = "externalFeatureId";
  @jakarta.annotation.Nullable
  private String externalFeatureId;

  public static final String JSON_PROPERTY_ION_MASS = "ionMass";
  @jakarta.annotation.Nullable
  private Double ionMass;

  public static final String JSON_PROPERTY_CHARGE = "charge";
  @jakarta.annotation.Nonnull
  private Integer charge;

  public static final String JSON_PROPERTY_DETECTED_ADDUCTS = "detectedAdducts";
  @jakarta.annotation.Nonnull
  private Set<String> detectedAdducts = new LinkedHashSet<>();

  public static final String JSON_PROPERTY_RT_START_SECONDS = "rtStartSeconds";
  @jakarta.annotation.Nullable
  private Double rtStartSeconds;

  public static final String JSON_PROPERTY_RT_END_SECONDS = "rtEndSeconds";
  @jakarta.annotation.Nullable
  private Double rtEndSeconds;

  public static final String JSON_PROPERTY_RT_APEX_SECONDS = "rtApexSeconds";
  @jakarta.annotation.Nullable
  private Double rtApexSeconds;

  public static final String JSON_PROPERTY_QUALITY = "quality";
  @jakarta.annotation.Nullable
  private DataQuality quality;

  public static final String JSON_PROPERTY_HAS_MS1 = "hasMs1";
  @jakarta.annotation.Nullable
  private Boolean hasMs1;

  public static final String JSON_PROPERTY_HAS_MS_MS = "hasMsMs";
  @jakarta.annotation.Nullable
  private Boolean hasMsMs;

  public static final String JSON_PROPERTY_MS_DATA = "msData";
  @jakarta.annotation.Nullable
  private MsData msData;

  public static final String JSON_PROPERTY_TOP_ANNOTATIONS = "topAnnotations";
  @jakarta.annotation.Nullable
  private FeatureAnnotations topAnnotations;

  public static final String JSON_PROPERTY_TOP_ANNOTATIONS_DE_NOVO = "topAnnotationsDeNovo";
  @jakarta.annotation.Nullable
  private FeatureAnnotations topAnnotationsDeNovo;

  public static final String JSON_PROPERTY_COMPUTING = "computing";
  @jakarta.annotation.Nullable
  private Boolean computing;

  public static final String JSON_PROPERTY_COMPUTED_TOOLS = "computedTools";
  @jakarta.annotation.Nullable
  private ComputedSubtools computedTools;

  public static final String JSON_PROPERTY_TAGS = "tags";
  @jakarta.annotation.Nullable
  private Map<String, Tag> tags;

  public AlignedFeature() {
  }

  public AlignedFeature alignedFeatureId(@jakarta.annotation.Nullable String alignedFeatureId) {
    
    this.alignedFeatureId = alignedFeatureId;
    return this;
  }

  /**
   * Get alignedFeatureId
   * @return alignedFeatureId
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ALIGNED_FEATURE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getAlignedFeatureId() {
    return alignedFeatureId;
  }


  @JsonProperty(JSON_PROPERTY_ALIGNED_FEATURE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAlignedFeatureId(@jakarta.annotation.Nullable String alignedFeatureId) {
    this.alignedFeatureId = alignedFeatureId;
  }

  public AlignedFeature compoundId(@jakarta.annotation.Nullable String compoundId) {
    
    this.compoundId = compoundId;
    return this;
  }

  /**
   * Get compoundId
   * @return compoundId
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COMPOUND_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getCompoundId() {
    return compoundId;
  }


  @JsonProperty(JSON_PROPERTY_COMPOUND_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCompoundId(@jakarta.annotation.Nullable String compoundId) {
    this.compoundId = compoundId;
  }

  public AlignedFeature name(@jakarta.annotation.Nullable String name) {
    
    this.name = name;
    return this;
  }

  /**
   * Get name
   * @return name
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }


  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setName(@jakarta.annotation.Nullable String name) {
    this.name = name;
  }

  public AlignedFeature externalFeatureId(@jakarta.annotation.Nullable String externalFeatureId) {
    
    this.externalFeatureId = externalFeatureId;
    return this;
  }

  /**
   * Externally provided FeatureId (e.g. by some preprocessing tool).  This FeatureId is NOT used by SIRIUS but is stored to ease mapping information back to the source.
   * @return externalFeatureId
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EXTERNAL_FEATURE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getExternalFeatureId() {
    return externalFeatureId;
  }


  @JsonProperty(JSON_PROPERTY_EXTERNAL_FEATURE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExternalFeatureId(@jakarta.annotation.Nullable String externalFeatureId) {
    this.externalFeatureId = externalFeatureId;
  }

  public AlignedFeature ionMass(@jakarta.annotation.Nullable Double ionMass) {
    
    this.ionMass = ionMass;
    return this;
  }

  /**
   * Get ionMass
   * @return ionMass
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ION_MASS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getIonMass() {
    return ionMass;
  }


  @JsonProperty(JSON_PROPERTY_ION_MASS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIonMass(@jakarta.annotation.Nullable Double ionMass) {
    this.ionMass = ionMass;
  }

  public AlignedFeature charge(@jakarta.annotation.Nonnull Integer charge) {
    
    this.charge = charge;
    return this;
  }

  /**
   * Ion mode (charge) this feature has been measured in.
   * @return charge
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_CHARGE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Integer getCharge() {
    return charge;
  }


  @JsonProperty(JSON_PROPERTY_CHARGE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCharge(@jakarta.annotation.Nonnull Integer charge) {
    this.charge = charge;
  }

  public AlignedFeature detectedAdducts(@jakarta.annotation.Nonnull Set<String> detectedAdducts) {
    
    this.detectedAdducts = detectedAdducts;
    return this;
  }

  public AlignedFeature addDetectedAdductsItem(String detectedAdductsItem) {
    if (this.detectedAdducts == null) {
      this.detectedAdducts = new LinkedHashSet<>();
    }
    this.detectedAdducts.add(detectedAdductsItem);
    return this;
  }

  /**
   * Adducts of this feature that have been detected during preprocessing.
   * @return detectedAdducts
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_DETECTED_ADDUCTS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Set<String> getDetectedAdducts() {
    return detectedAdducts;
  }


  @JsonDeserialize(as = LinkedHashSet.class)
  @JsonProperty(JSON_PROPERTY_DETECTED_ADDUCTS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDetectedAdducts(@jakarta.annotation.Nonnull Set<String> detectedAdducts) {
    this.detectedAdducts = detectedAdducts;
  }

  public AlignedFeature rtStartSeconds(@jakarta.annotation.Nullable Double rtStartSeconds) {
    
    this.rtStartSeconds = rtStartSeconds;
    return this;
  }

  /**
   * Get rtStartSeconds
   * @return rtStartSeconds
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RT_START_SECONDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getRtStartSeconds() {
    return rtStartSeconds;
  }


  @JsonProperty(JSON_PROPERTY_RT_START_SECONDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRtStartSeconds(@jakarta.annotation.Nullable Double rtStartSeconds) {
    this.rtStartSeconds = rtStartSeconds;
  }

  public AlignedFeature rtEndSeconds(@jakarta.annotation.Nullable Double rtEndSeconds) {
    
    this.rtEndSeconds = rtEndSeconds;
    return this;
  }

  /**
   * Get rtEndSeconds
   * @return rtEndSeconds
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RT_END_SECONDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getRtEndSeconds() {
    return rtEndSeconds;
  }


  @JsonProperty(JSON_PROPERTY_RT_END_SECONDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRtEndSeconds(@jakarta.annotation.Nullable Double rtEndSeconds) {
    this.rtEndSeconds = rtEndSeconds;
  }

  public AlignedFeature rtApexSeconds(@jakarta.annotation.Nullable Double rtApexSeconds) {
    
    this.rtApexSeconds = rtApexSeconds;
    return this;
  }

  /**
   * Get rtApexSeconds
   * @return rtApexSeconds
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RT_APEX_SECONDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getRtApexSeconds() {
    return rtApexSeconds;
  }


  @JsonProperty(JSON_PROPERTY_RT_APEX_SECONDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRtApexSeconds(@jakarta.annotation.Nullable Double rtApexSeconds) {
    this.rtApexSeconds = rtApexSeconds;
  }

  public AlignedFeature quality(@jakarta.annotation.Nullable DataQuality quality) {
    
    this.quality = quality;
    return this;
  }

  /**
   * Get quality
   * @return quality
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_QUALITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public DataQuality getQuality() {
    return quality;
  }


  @JsonProperty(JSON_PROPERTY_QUALITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setQuality(@jakarta.annotation.Nullable DataQuality quality) {
    this.quality = quality;
  }

  public AlignedFeature hasMs1(@jakarta.annotation.Nullable Boolean hasMs1) {
    
    this.hasMs1 = hasMs1;
    return this;
  }

  /**
   * If true, the feature has at lease one MS1 spectrum
   * @return hasMs1
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_HAS_MS1)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isHasMs1() {
    return hasMs1;
  }


  @JsonProperty(JSON_PROPERTY_HAS_MS1)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setHasMs1(@jakarta.annotation.Nullable Boolean hasMs1) {
    this.hasMs1 = hasMs1;
  }

  public AlignedFeature hasMsMs(@jakarta.annotation.Nullable Boolean hasMsMs) {
    
    this.hasMsMs = hasMsMs;
    return this;
  }

  /**
   * If true, the feature has at lease one MS/MS spectrum
   * @return hasMsMs
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_HAS_MS_MS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isHasMsMs() {
    return hasMsMs;
  }


  @JsonProperty(JSON_PROPERTY_HAS_MS_MS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setHasMsMs(@jakarta.annotation.Nullable Boolean hasMsMs) {
    this.hasMsMs = hasMsMs;
  }

  public AlignedFeature msData(@jakarta.annotation.Nullable MsData msData) {
    
    this.msData = msData;
    return this;
  }

  /**
   * Get msData
   * @return msData
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MS_DATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public MsData getMsData() {
    return msData;
  }


  @JsonProperty(JSON_PROPERTY_MS_DATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMsData(@jakarta.annotation.Nullable MsData msData) {
    this.msData = msData;
  }

  public AlignedFeature topAnnotations(@jakarta.annotation.Nullable FeatureAnnotations topAnnotations) {
    
    this.topAnnotations = topAnnotations;
    return this;
  }

  /**
   * Get topAnnotations
   * @return topAnnotations
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TOP_ANNOTATIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public FeatureAnnotations getTopAnnotations() {
    return topAnnotations;
  }


  @JsonProperty(JSON_PROPERTY_TOP_ANNOTATIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTopAnnotations(@jakarta.annotation.Nullable FeatureAnnotations topAnnotations) {
    this.topAnnotations = topAnnotations;
  }

  public AlignedFeature topAnnotationsDeNovo(@jakarta.annotation.Nullable FeatureAnnotations topAnnotationsDeNovo) {
    
    this.topAnnotationsDeNovo = topAnnotationsDeNovo;
    return this;
  }

  /**
   * Get topAnnotationsDeNovo
   * @return topAnnotationsDeNovo
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TOP_ANNOTATIONS_DE_NOVO)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public FeatureAnnotations getTopAnnotationsDeNovo() {
    return topAnnotationsDeNovo;
  }


  @JsonProperty(JSON_PROPERTY_TOP_ANNOTATIONS_DE_NOVO)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTopAnnotationsDeNovo(@jakarta.annotation.Nullable FeatureAnnotations topAnnotationsDeNovo) {
    this.topAnnotationsDeNovo = topAnnotationsDeNovo;
  }

  public AlignedFeature computing(@jakarta.annotation.Nullable Boolean computing) {
    
    this.computing = computing;
    return this;
  }

  /**
   * Write lock for this feature. If the feature is locked no write operations are possible.  True if any computation is modifying this feature or its results
   * @return computing
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COMPUTING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isComputing() {
    return computing;
  }


  @JsonProperty(JSON_PROPERTY_COMPUTING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setComputing(@jakarta.annotation.Nullable Boolean computing) {
    this.computing = computing;
  }

  public AlignedFeature computedTools(@jakarta.annotation.Nullable ComputedSubtools computedTools) {
    
    this.computedTools = computedTools;
    return this;
  }

  /**
   * Get computedTools
   * @return computedTools
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COMPUTED_TOOLS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public ComputedSubtools getComputedTools() {
    return computedTools;
  }


  @JsonProperty(JSON_PROPERTY_COMPUTED_TOOLS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setComputedTools(@jakarta.annotation.Nullable ComputedSubtools computedTools) {
    this.computedTools = computedTools;
  }

  public AlignedFeature tags(@jakarta.annotation.Nullable Map<String, Tag> tags) {
    
    this.tags = tags;
    return this;
  }

  public AlignedFeature putTagsItem(String key, Tag tagsItem) {
    if (this.tags == null) {
      this.tags = new HashMap<>();
    }
    this.tags.put(key, tagsItem);
    return this;
  }

  /**
   * Key: tagName, value: tag
   * @return tags
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Map<String, Tag> getTags() {
    return tags;
  }


  @JsonProperty(JSON_PROPERTY_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTags(@jakarta.annotation.Nullable Map<String, Tag> tags) {
    this.tags = tags;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AlignedFeature alignedFeature = (AlignedFeature) o;
    return Objects.equals(this.alignedFeatureId, alignedFeature.alignedFeatureId) &&
        Objects.equals(this.compoundId, alignedFeature.compoundId) &&
        Objects.equals(this.name, alignedFeature.name) &&
        Objects.equals(this.externalFeatureId, alignedFeature.externalFeatureId) &&
        Objects.equals(this.ionMass, alignedFeature.ionMass) &&
        Objects.equals(this.charge, alignedFeature.charge) &&
        Objects.equals(this.detectedAdducts, alignedFeature.detectedAdducts) &&
        Objects.equals(this.rtStartSeconds, alignedFeature.rtStartSeconds) &&
        Objects.equals(this.rtEndSeconds, alignedFeature.rtEndSeconds) &&
        Objects.equals(this.rtApexSeconds, alignedFeature.rtApexSeconds) &&
        Objects.equals(this.quality, alignedFeature.quality) &&
        Objects.equals(this.hasMs1, alignedFeature.hasMs1) &&
        Objects.equals(this.hasMsMs, alignedFeature.hasMsMs) &&
        Objects.equals(this.msData, alignedFeature.msData) &&
        Objects.equals(this.topAnnotations, alignedFeature.topAnnotations) &&
        Objects.equals(this.topAnnotationsDeNovo, alignedFeature.topAnnotationsDeNovo) &&
        Objects.equals(this.computing, alignedFeature.computing) &&
        Objects.equals(this.computedTools, alignedFeature.computedTools) &&
        Objects.equals(this.tags, alignedFeature.tags);
  }

  @Override
  public int hashCode() {
    return Objects.hash(alignedFeatureId, compoundId, name, externalFeatureId, ionMass, charge, detectedAdducts, rtStartSeconds, rtEndSeconds, rtApexSeconds, quality, hasMs1, hasMsMs, msData, topAnnotations, topAnnotationsDeNovo, computing, computedTools, tags);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AlignedFeature {\n");
    sb.append("    alignedFeatureId: ").append(toIndentedString(alignedFeatureId)).append("\n");
    sb.append("    compoundId: ").append(toIndentedString(compoundId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    externalFeatureId: ").append(toIndentedString(externalFeatureId)).append("\n");
    sb.append("    ionMass: ").append(toIndentedString(ionMass)).append("\n");
    sb.append("    charge: ").append(toIndentedString(charge)).append("\n");
    sb.append("    detectedAdducts: ").append(toIndentedString(detectedAdducts)).append("\n");
    sb.append("    rtStartSeconds: ").append(toIndentedString(rtStartSeconds)).append("\n");
    sb.append("    rtEndSeconds: ").append(toIndentedString(rtEndSeconds)).append("\n");
    sb.append("    rtApexSeconds: ").append(toIndentedString(rtApexSeconds)).append("\n");
    sb.append("    quality: ").append(toIndentedString(quality)).append("\n");
    sb.append("    hasMs1: ").append(toIndentedString(hasMs1)).append("\n");
    sb.append("    hasMsMs: ").append(toIndentedString(hasMsMs)).append("\n");
    sb.append("    msData: ").append(toIndentedString(msData)).append("\n");
    sb.append("    topAnnotations: ").append(toIndentedString(topAnnotations)).append("\n");
    sb.append("    topAnnotationsDeNovo: ").append(toIndentedString(topAnnotationsDeNovo)).append("\n");
    sb.append("    computing: ").append(toIndentedString(computing)).append("\n");
    sb.append("    computedTools: ").append(toIndentedString(computedTools)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

